package com.example.demo.web.common.filter;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Component;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Filter;
import org.noear.solon.core.handle.FilterChain;

/**
 * @author airhead
 */
@Slf4j
@Component
public class GlobalFilter implements Filter {
  @Override
  public void doFilter(Context ctx, FilterChain chain) throws Throwable {
    String path = ctx.path();
    log.info("1. GlobalFilter, path: {}", path);
    chain.doFilter(ctx);
  }
}
